# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=html-xml-utils
pkgver=8.4
pkgrel=0
pkgdesc="A number of simple utilities for manipulating HTML and XML files."
url="https://www.w3.org/Tools/HTML-XML-utils/"
arch="all"
license="Custom"
subpackages="$pkgname-doc"
source="$url/$pkgname-$pkgver.tar.gz
	getopt-musl-fix.patch
	last-test.patch"

prepare() {
	default_prepare
	sed -e "/doc_DATA = COPYING/d" \
	-i Makefile.in
}

build() {
	./configure \
		--prefix=/usr \
		--disable-dependency-tracking
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
	install -D -m 644 COPYING \
		"$pkgdir"/usr/share/licenses/$pkgname/COPYING
}

sha512sums="
8e011e8bb73b0ca46af8aa54f8080b0ba0ac074910056571ab030d5b8ac2156a5ba0342bfe1ddc3a60ea8ec7c2149b58fc126fc59204fead5f0366ebb8fa46a7  html-xml-utils-8.4.tar.gz
7b6d03798e634a72402916cdfaf69668bf19d0dc6d629860c798a6468f8077906e3ada6d1ff390cebba505ccd118cfa7f7b2e23301ac72573bde4b4eb14c94ce  getopt-musl-fix.patch
fdfaa8ff145beaf98203f834ef51763d14f5eeb1ba366578a645bfc3a0d811c2615354bea987554d6a8b131504298512238af550646e2826e00329aceee365ed  last-test.patch
"
